#!/usr/bin/python
# -*- coding: UTF-8 -*-
# author : bird.zhang@ximalaya.com

import requests
import random

url = "https://upload-csec.api.qcloud.com"

SecretId = 'AKID1wgO0UEoDRUL0SoCdx9B2hATb7XyORO9'
SecretKey = 'iIk1e8RFsJY0Hk7IH4iDex9ED85tWxEB'

params = {
    'Action': 'ContentSecurity.Image.Recognition',
    'Region': 'ap-shanghai-1',
    'Timestamp': None,
    'Nonce': random.randint(1, 65536),
    'SecretId': 'AKID1wgO0UEoDRUL0SoCdx9B2hATb7XyORO9',
    'Signature': None,
    'fileName': 'test',
    'fileUrl': 'http://fdfs.xmcdn.com/group9/M04/8D/54/wKgDYldaZfexetmeAADv8ggvjyI124_mobile_small.jpg'
}

response = requests.post(url, params=params)
print(response.text)
